/*
 *	Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.shishuo.com
 */

package com.hlingsoft.cms.dao;

import com.hlingsoft.cms.entity.Image;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 网站配置
 * 
 * @author Zhangjiale
 * 
 */

@Repository
public interface ImageDao {



	/**
	 * 添加图片
	 * 
	 * @return Integer
	 */
	public long addImages(Image image);


	/**
	 * 查找商品图片
	 * @param goodsId
	 * @param type
	 * @return
	 */
	public List<Image> getImageByGoodsId(@Param("goodsId")long goodsId,@Param("type") int type);

	/**
	 * 根据id查询
	 * @param id
	 * @return
	 */
	public Image getImageById(@Param("id")long id);


    public int deleteImage(@Param("id") long id);

	public int updateImageNewsId(Image image);

	/**
	 * 统计用户图片
	 * @param appUserId
	 * @return
	 */
	public int getImageByAppUserIdCount(@Param("appUserId") long appUserId);

	/**
	 * 获取
	 * @param tagsId
	 * @return
	 */
	public Image getImageByTagsId(@Param("tagsId")long tagsId);

	public List<Image> getImageByNewsId(@Param("newsId")long newsId);

	/**
	 * 更新图片
	 * @param image
	 * @return
	 */
	public int updateImage(Image image);

	public List<Image> getImageByAppUserIdWithNone(@Param("appUserId") long appUserId);

}
